<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments/fragment_head :: head">
</head>
<body>
<nav th:replace="fragments/top_header :: header(1)"></nav>
<div class="container">
    <h3 th:text="${userModel.title}">用户管理原型</h3>
    <div class="container">
        <a href="form.html" th:href="@{/users/form}" class="btn btn-success" role="button">创建用户</a>
    </div>
    <table border="1" class="table table-bordered">
        <thead >
        <tr>
            <th class="text-center">Id</th>
            <th class="text-center">姓名</th>
            <th class="text-center">创建时间</th>
            <th class="text-center">操作</th>
        </tr>
        </thead>
        <tbody>
        <!--/*/<tr th:if="${userModel.userList.size()} eq 0"><td colspan="4">没有用户信息</td></tr>/*/-->

        <tr th:each="user :${userModel.userList}">
            <td class="text-center" th:text="${user.id}">1</td>
            <td ><a href="view.html" th:href="@{'/users/'+${user.id}}" th:text="${user.name}">张三</a></td>
            <td class="text-center" th:text="${#dates.format(user.cruetTime, 'yyyy-MM-dd HH:mm:ss')}">2017-12-22</td>
            <td class="text-center"><a role="button" class="btn btn-danger" href="list.html" th:href="@{'/users/del/'+${user.id}}">删除</a> <a role="button" class="btn btn-warning" href="form.html" th:href="@{'/users/goUpdata/'+${user.id}}">修改</a></td>
        </tr>
        </tbody>

    </table>
</div>

<footer th:replace="fragments/foor_footer :: footer"></footer>
</body>
</html>